package com.zyf.chapter02.structure.flyweight.piece.refactor;

import com.zyf.chapter02.structure.flyweight.piece.ChessPiece;

/**
 * 棋子享元类
 * @author yifeng
 */
public class ChessPieceUnit {
    private int id;
    private String text;
    private ChessPiece.Color color;

    public ChessPieceUnit(int id, String text, ChessPiece.Color color) {
        this.id = id;
        this.text = text;
        this.color = color;
    }

    public static enum Color {
        RED, BLACK
    }

    public int getId() {
        return id;
    }

    public String getText() {
        return text;
    }

    public ChessPiece.Color getColor() {
        return color;
    }
}
